//
//  MeCellFirst.m
//  Dear
//
//  Created by Taiping002 on 15/7/13.
//  Copyright (c) 2015年 陈俊俊. All rights reserved.
//

#import "MeCellFirst.h"
#import "UIImageView+WebCache.h"
#import "TPFileManager.h"
@implementation MeCellFirst

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)showDataWithArray:(NSArray *)arr {
    NSString *picture = arr[0];
    if ([picture isEqualToString:HeadImage]) {
        NSData *data = [TPFileManager getPhoto:[NSString stringWithFormat:@"%@%@",HeadImage,[DearUser sharedInstance].userId]];
        self.headImV.image = [UIImage imageWithData:data];
    }else if([picture isEqualToString:@"shoot"]){
        self.headImV.image = [UIImage imageNamed:@"shoot"];
    }else{
        NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@?path=%@",ServerUrl,DearImage,picture]];
        [self.headImV sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"shoot"]];
    }
    self.titleLabel.text = arr[1];
    self.numberLabel.text = arr[2];

}
@end
